package com.binge.backend.dao;

import com.binge.backend.entity.CartEntity;
import io.lettuce.core.dynamic.annotation.Param;
import org.mapstruct.Mapper;

import java.util.List;

/**
 * @author binge
 * @Description 购物车映射接口
 * @date 2023年10月01日 下午 9:14
 */
@Mapper
public interface CartMapper {
    int insertBookByName(@Param("userId") int userId, @Param("bookId") int bookId);

    int selectOrderCarBook(@Param("userId") int userId, @Param("bookId") int bookId);

    int updateBookNum(@Param("userId") int userId, @Param("bookId") int bookId);

    int getBookNum(int id);

    int deleteUserShopCarBook(int id);

    int selectOrderCarCount();

    List<CartEntity> getUserCart(String username);
}
